#include<stdio.h>
#include<string.h>
int main()
{
	int i,n,j;
	char s[50];
	gets(s);
	n=strlen(s);
	for(i=0;s[i]!='\0';i++)
	{
		if(s[i]>='a'&&s[i]<='z')
		    s[i]=(s[i]+3-'a')%26+'a';
		else if(s[i]>='A'&&s[i]<='Z')
		    s[i]=(s[i]+3-'A')%26+'A';
		if(s[i]>='a'&&s[i]<='z')
		    s[i]-=32;
		else if(s[i]>='A'&&s[i]<='Z')
		    s[i]+=32;	
	}
	for(j=n-1;j>=n/2;j--)
	{
		char temp=s[j];
		s[j]=s[n-1-j];
		s[n-1-j]=temp;
	}
		
	puts(s);
	return 0;
 } 
